#!/bin/bash

MAXWELL_HOME=/opt/module/maxwell-1.29.2

import_data(){
  $MAXWELL_HOME/bin/maxwell-bootstrap --database edu --table $1  --config $MAXWELL_HOME/config.properties
}

case $1 in
"base_category_info")
    import_data base_category_info;;
"base_province")
    import_data base_province;;
"base_sourceour")
    import_data base_sourceour;;
"base_subject_info")
    import_data base_subject_info;;
"cart_info")
    import_data cart_info;;
"chapter_info")
    import_data chapter_info;;
"comment_info")
    import_data comment_info;;
"course_info")
    import_data course_info;;
"favor_info")
    import_data favor_info;;
"knowledge_point")
    import_data knowledge_point;;
"order_detail")
    import_data order_detail;;
"order_info")
    import_data order_info;;
"payment_info")
    import_data payment_info;;
"review_info")
    import_data review_info;;
"test_exam")
    import_data test_exam;;
"test_exam_question")
    import_data test_exam_question;;
"test_paper")
    import_data test_paper;;
"test_paper_question")
    import_data test_paper_question;;
"test_point_question")
    import_data test_point_question;;
"test_ question_info")
    import_data test_ question_info;;
"test_ question_option")
    import_data test_ question_option;;
"user_chapter_process")
    import_data user_chapter_process;;
"user_info")
    import_data user_info;;
"video_info")
    import_data video_info;;
"vip_change_detail")
    import_data vip_change_detail;;
"all")
   import_data base_category_info
   import_data base_province
   import_data base_sourceour
   import_data base_subject_info
   import_data cart_info
   import_data chapter_info
   import_data comment_info
   import_data course_info
   import_data favor_info
   import_data knowledge_point
   import_data order_detail
   import_data order_info
   import_data payment_info
   import_data review_info
   import_data test_exam
   import_data test_exam_question
   import_data test_paper
   import_data test_paper_question
   import_data test_point_question
   import_data test_ question_info
   import_data test_ question_option
   import_data user_chapter_process
   import_data user_info
   import_data video_info
   import_data vip_change_detail
;;
esac

